package com.tdkj.model.user;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyUserPhotos entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_user_photos")
public class BeanUserPhotos extends BaseEntity{

	// Fields

	private Long photospace;
	private Integer photonumbers;
	private String state;
	private Timestamp changetime;
	private Set<BeanUserPhotoDetail> userPhotoDetails = new HashSet<BeanUserPhotoDetail>(0);

	// Constructors

	/** default constructor */
	public BeanUserPhotos() {
	}

	/** minimal constructor */
	public BeanUserPhotos(long id) {
		this.setId(id);
	}

	/** full constructor */
	public BeanUserPhotos(long id,Long photospace, Integer photonumbers, String state,
			Timestamp changetime, Set<BeanUserPhotoDetail> userPhotoDetails) {
		this.setId(id);
		this.photospace = photospace;
		this.photonumbers = photonumbers;
		this.state = state;
		this.changetime = changetime;
		this.userPhotoDetails = userPhotoDetails;
	}

	@Column(name = "photospace", precision = 10, scale = 0)
	public Long getPhotospace() {
		return this.photospace;
	}

	public void setPhotospace(Long photospace) {
		this.photospace = photospace;
	}

	@Column(name = "photonumbers")
	public Integer getPhotonumbers() {
		return this.photonumbers;
	}

	public void setPhotonumbers(Integer photonumbers) {
		this.photonumbers = photonumbers;
	}

	@Column(name = "state", length = 40)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "changetime", nullable = false, length = 19)
	public Timestamp getChangetime() {
		return this.changetime;
	}

	public void setChangetime(Timestamp changetime) {
		this.changetime = changetime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "userPhotos")
	public Set<BeanUserPhotoDetail> getUserPhotoDetails() {
		return this.userPhotoDetails;
	}

	public void setUserPhotoDetails(Set<BeanUserPhotoDetail> userPhotoDetails) {
		this.userPhotoDetails = userPhotoDetails;
	}

}